package lab.poc.erl.otp;

public class GenServerReplyStop extends GenServerReply {

	public final StopReason stopType;
	public final String reasonInfo;
	public final Throwable optionalReasonInfo;

	public GenServerReplyStop(final Object replyMsg, final Object state,
			final StopReason stopType, final String reasonInfo,
			final Throwable optionalReasonInfo) {
		super(replyMsg, state);
		this.stopType = stopType;
		this.reasonInfo = reasonInfo;
		this.optionalReasonInfo = optionalReasonInfo;
	}

	@Override
	public final boolean isStop() {
		return this instanceof GenServerReplyStop;
	}
}
